pp108 : For Each Construct Properties Interface

For Each Construct Properties Interface

This topic describes the fields on the pane.


Table 1. For Each Construct Properties Interface

Tab Field Description
General Description A description of the For Each loop.
Font Size Allows the user to decrease or increase the font size of the text within the activity. The default font size is 12.
Select Condition Define the XPath of the condition if the selection condition is known during design-time, The For Each group is executed (iterated) for each XML node in the Message Map that matches the XPath condition.The Select Condition can be of types - Static or Read from Message Select the Static option to specify the select condition in the Value field.Select the Read from Message option to read the select condition from the Process Specific Messages in the Message Map. This ensures that the business process does not have to be modified for every change. You can build a select condition by clicking () appearing at the end of this field. Click this icon to select a condition.
Note: Ensure that the dynamic condition, which is taken from the Message Map does not start with a slash.
Iterator Name

Defines a name for the XPath condition for selection condition. Thus, while creating assignments in the Message Map, specify the Iterator Name instead of the XPath condition.An element for the For Each loop is created In the Source column of the Message Map, where:

  • The Description of the For Each group construct, forms the root element, and
  • The Iterator Name forms the child element.

    Note: The Iterator Name property is available for constructs within a For Each loop. If you do not assign an Iterator Name, the default value given is Iterator_<ID of For Each>. For example, Iterator_o_39.
Execute Condition

Enables you to specify the actual condition or the message from where the condition should be picked up for execution.Select one of the following options:

  • None: This option is displayed by default. Select this option if you do not want to specify any execute condition.
  • Static: Select Static option to specify the actual condition for execution. You can build a condition by clicking the XPath editor icon () appearing at the end of this field.
  • Read from Message: Select Read from Message option to read the condition from the Process Specific Messages in the Message Map. This ensures that the business process does not have to be modified for every change. Click to build a condition.

    Note:
  • Ensure that the Read from Message condition from the Message Map does not start with a slash.
  • If a message contains an XPath expression, then the XPath need not be in single quotes. For example, if the message is /mycondition and it contains an expression as follows: GetEmployeeOutput/GetEmployeeResponse/tuple/old/Employees/City = "London", the XPath will be as follows: GetEmployeeOutput/GetEmployeeResponse/tuple/old/Employees/City = "London".
    In a For Each construct, the Execute Condition option can be used instead of the Decision construct.You can view a small Decision icon on the left at the bottom of the construct to indicate that the activity includes a condition to be executed.
Data

Select the input data required for each iterator. You may select any one of the following:

  • Read from Message: Upon selecting this option, the input data is extracted from the message map.
  • Read file URL from Message: Select this option and click to dynamically provide a file path from the message map (i.e. XML from web URL or file location) to get the streaming support for the For Each construct.
    Note: This will support only forward navigation across matched elements. For example, read the code sample below.
    <bookstore>
        <book>
            <title lang="eng">Harry Potter</title>
            <price>29.99</price>
        </book>
        <book>
            <title lang="eng">Learning XML</title>
            <price>39.95</price>
        </book>
    </bookstore>
    
    In this case, forward navigation such as /bookstore/book/title (complete XPath) is supported but backward navigation such as ancestor::book or descendant::book is not supported.
    Refer to Handling large XML documents in Process Platform - Streaming XML content for more information from a requirement and application standpoint.
Monitoring Configure Monitoring Select this checkbox to enable/disable monitoring for the activity.
Monitor Level


  • Activity status: Records activity status, timestamp, user, etc. When you set the monitor level at this parameter, only the activity status is monitored. This helps in getting the updated activity status and to spot errors should the activity abort.
  • Activity status, input and output messages: Records the input and output messages of the activity along with its status. When you set the monitor level at this parameter, the activity status and the input and output messages of the message map is monitored. This helps in tracking and spotting any error occuring at this level.
  • Store complete activity information if activity aborts: Records activity status and input and output messages information only if the activity process aborts. If the activity is successfully completed, none of the monitoring information is recorded.
Recovery Store recovery data (It is a point of recovery from where the process will restart if it fails in middle of execution.) Enable or disable recovery data for the activity. When you enable store recovery data at the activity level, the data is recovered only for the current activity. For more information on crash recovery, see Crash Recovery. If the recovery option is not enabled, lost data cannot be recovered when system and other failures occur or when the system is infected by a virus.
Recovery option

The Recovery Option field is visible when crash recovery is enabled for the activity.

  • At every iteration: The recovery data point is set at every iteration. This means that at every iteration of the current activity, data is stored for recovery.
  • At the end of all iterations: The recovery data point is set at the end of all iterations. This means that dta is stored for recovery only after all the iterations of the current activity are completed.
Annotation Annotation Additional notes or comments on For Each construct, if any.


Related tasks

Setting the Properties of For Each